<template>
    <u-page-config
      v-model="filter"
      label-width="100px"
      :getList="getList"
      :tableData="tableData"
      :tableColumn="tableColumn"
      :total="total"
      :showFilter="false"
      :loading="loading"
    >
    </u-page-config>
</template>

<script>
import UPageConfig from '@/components/uPageConfig/index'
import table from '@/mixin/uTable'
import {reqHistoryVersion} from '@/api/device/plugin.js'

export default {
  mixins: [table],
  components: { UPageConfig },
  props:{
    pluginCode: String
  },
  data() {
    return {
      filter: {
        pageSize: 10,
        pageNum: 1,
        data: {

        }
      },
      tableColumn: [
        { label: '插件名称', prop: 'pluginName', attr:{ width: 120 }},
        { label: '版本号', prop: 'version',  attr:{ width: 120 } },
        { label: '更新内容', prop: 'updateContent' },
      ],
    }
  },
  watch:{
    pluginCode(){
      this.getList()
    }
  },
  methods: {

    /** 查询工单列表 */
   async getList() {
      this.tableData = (await this.getInit(reqHistoryVersion, this.pluginCode)).data
    }
  }
}
</script>

<style lang="scss" scoped>
.form-item-wrap {
  display: flex;
}
</style>
